package io.zhaocy.springbootenable.annotation;

import java.lang.reflect.Method;

/**
 * Description:
 *
 * @Author: genezhao
 * @Date: 2018-07-13
 */
public class Market {

    @MyMarket
    public static void myMeth() {

        Market market = new Market();

        try {
            Method m = market.getClass().getMethod("myMeth");

            if (m.isAnnotationPresent(MyMarket.class)) {
                System.out.println("MyMarket is present.");
            }
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }
    }


    public static void main(String[] args) {
        myMeth();
    }
}
